<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>处理页面</title>
<meta content="" name="description">
<script type="text/javascript" src="/j-tool/jquery.js"></script>
<style>
	td{font-size:12px;padding: 0 20px;height:25px;}
	table{margin:0 auto;}
</style>
<body>
<div>
	<table>
	<!--{foreach from=$data item=val key=key}-->
		<tr>
			<td><!--{$key+1}--></td>
			<td><!--{$val.name}--></td>
			<td><!--{$val.link}--></td>
			<td><!--{$val.img}--></td>			
			<td style="width:77px;">
			<!--{if $val.step == 1}-->
			<button onclick="update('<!--{$val.id}-->',this)">更新数据</button>
			<!--{elseif $val.step == 2}-->
			<button onclick="url('<!--{$val.id}-->','<!--{$val.code}-->',this)">swf路径</button>
			<!--{elseif $val.step == 3}-->
			<b>待下载...</b>
			<!--{/if}-->
			</td>			
		</tr>
	<!--{/foreach}-->
		<tr>
			<td style="text-align:center" colspan="4"><button onclick="updateAll(this)">全部下载更新</button></td>
		</tr>
	</table>
</div>
</body>
<script>
	var fromid = "<!--{$from}-->";
	eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([abd-gj-rt-vyzA-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('A R(l){o S="K://s.61baobao.L";l=F(F(F((l))));l=S+l;v l}A addswf(l,w,h){l=R(l);g(!w)w=669;g(!h)h=479;document.write(\'<T classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="K://download.U.L/pub/V/cabs/W/swflash.cab#version=6,0,28,0"  X="\'+w+\'" Y="\'+h+\'" Z="M"><G B="1a" H="1b"><G B="movie" H="\'+l+\'"><G B="1c" H="1d"><G B="1e" H="1f"><1g wmode="opaque" src="\'+l+\'" X="\'+w+\'" Y="\'+h+\'" 1c="1d" pluginspage="K://www.U.L/go/getflashplayer" type="application/x-V-W" 1a="1b" 1e="1f"  Z="M" B="M" ></1g></T>\')}A base64encode(b){b=1h(b);o a,i,d;o e,j,f;o p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";d=b.I;i=0;a="";y(i<d){e=b.k(i++)&C;g(i==d){a+=p.m(e>>2);a+=p.m((e&N)<<4);a+="==";t}j=b.k(i++);g(i==d){a+=p.m(e>>2);a+=p.m(((e&N)<<4)|((j&1i)>>4));a+=p.m((j&1j)<<2);a+="=";t}f=b.k(i++);a+=p.m(e>>2);a+=p.m(((e&N)<<4)|((j&1i)>>4));a+=p.m(((j&1j)<<2)|((f&1k)>>6));a+=p.m(f&z)}v a}A F(b){o e,j,f,u;o i,d,a;o D=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,O,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);d=b.I;i=0;a="";y(i<d){J{e=D[b.k(i++)&C]}y(i<d&&e==-1);g(e==-1)t;J{j=D[b.k(i++)&C]}y(i<d&&j==-1);g(j==-1)t;a+=q.r((e<<2)|((j&0x30)>>4));J{f=b.k(i++)&C;g(f==O)v a;f=D[f]}y(i<d&&f==-1);g(f==-1)t;a+=q.r(((j&0XF)<<4)|((f&0x3C)>>2));J{u=b.k(i++)&C;g(u==O)v a;u=D[u]}y(i<d&&u==-1);g(u==-1)t;a+=q.r(((f&0x03)<<6)|u)}a=1l(a);v a}A 1h(b){o a,i,d,c;a="";d=b.I;for(i=0;i<d;i++){c=b.k(i);g((c>=0x0001)&&(c<=0x007F)){a+=b.m(i)}1m g(c>0x07FF){a+=q.r(0xE0|((c>>12)&1n));a+=q.r(P|((c>>6)&z));a+=q.r(P|((c>>0)&z))}1m{a+=q.r(1k|((c>>6)&1o));a+=q.r(P|((c>>0)&z))}}v a}A 1l(b){o a,i,d,c;o E,Q;a="";d=b.I;i=0;y(i<d){c=b.k(i++);switch(c>>4){n 0:n 1:n 2:n 3:n 4:n 5:n 6:n 7:a+=b.m(i-1);t;n 12:n 13:E=b.k(i++);a+=q.r(((c&1o)<<6)|(E&z));t;n 14:E=b.k(i++);Q=b.k(i++);a+=q.r(((c&1n)<<12)|((E&z)<<6)|((Q&z)<<0));t}}v a}',[],87,'||||||||||out|str||len|c1|c3|if|||c2|charCodeAt|url|charAt|case|var|base64EncodeChars|String|fromCharCode||break|c4|return|||while|0x3F|function|name|0xff|base64DecodeChars|char2|base64decode|param|value|length|do|http|com|flashid1|0x3|61|0x80|char3|decode_url|server|object|macromedia|shockwave|flash|width|height|id|||||||||||allowScriptAccess|sameDomain|quality|high|menu|false|embed|utf16to8|0xF0|0xF|0xC0|utf8to16|else|0x0F|0x1F'.split('|'),0,{}))

	function b(e){var t,n,r,i,s,o,u;o=e.length,s=0,u="";while(s<o){do t=a[e.charCodeAt(s++)&255];while(s<o&&t==-1);if(t==-1)break;do n=a[e.charCodeAt(s++)&255];while(s<o&&n==-1);if(n==-1)break;u+=String.fromCharCode(t<<2|(n&48)>>4);do{r=e.charCodeAt(s++)&255;if(r==61)return u;r=a[r]}while(s<o&&r==-1);if(r==-1)break;u+=String.fromCharCode((n&15)<<4|(r&60)>>2);do{i=e.charCodeAt(s++)&255;if(i==61)return u;i=a[i]}while(s<o&&i==-1);if(i==-1)break;u+=String.fromCharCode((r&3)<<6|i)}return u}
	var a=new Array(-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1);

	function url(id,code,t)
	{
		var url = b(code);
			$.ajax({
			   type: "POST",
			   url: "/source/downfile.php",
			   data: "swfurl="+url+'&id='+id+'&step=2',
			   beforeSend:function(){
					$(t).text('正在更新').attr('disabled',true);
			   },
			   success: function(msg){
					var jsonData = $.parseJSON(msg);
					if(jsonData.res == 'OK')
					{
						$(t).replaceWith("<b>complete!</b>");
					}else{
						alert("更新swf路径遇到问题，请与管理员联系。");
					}			 
			   }
			});
	}

	function update(id,t)
	{
		$.ajax({
		   type: "POST",
		   url: "/source/downfile.php",
		   data: "id="+id+'&step=1'+'&fromid='+fromid,
		   beforeSend:function(){
				$(t).text('正在更新').attr('disabled',true);
		   },
		   success: function(msg){
				var jsonData = $.parseJSON(msg);
				if(jsonData.res == 'Err')
				{
					alert("更新数据遇到问题，请与管理员联系。");
				}else{
					$(t).replaceWith(jsonData.res);
				}			 
		   }
		});
	}

	function updateAll(t)
	{
		$.ajax({
		   type: "POST",
		   url: "/source/downfile.php",
		   data: "download=all",
		   success: function(msg){
				if(msg == 'OK')
				{
					$(t).replaceWith("<b>complete!</b>");
				}else{
					alert("下载文件遇到问题，请与管理员联系。");
				}			 
		   }
		});
	}
</script>
</html>